<table class="easyui-datagrid" id="contactlog_list"
	   fit="true" border="false"
	   singleSelect="true" fitColumns="true" pagination="true"
	   idField="" url="y.php?r=contactlog/getdata"  toolbar="#toolbar_contactlog" >
	<thead>
	<tr>
		<th field="title" width="60">主题</th>
		<th field="customer" width="60">客户</th>
		<th field="contact_type" width="60">联系类型</th>
		<th field="status" width="60">客户状态</th>
		<th field="contact_time_format" width="60">联系时间</th>
	</tr>
	</thead>
</table>
<div id="toolbar_contactlog">
	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="loadWin('添加联系记录','y.php?r=contactlog/showedit&contactlog_id=0')" /a>
	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="contactlog_showedit()"/a>
</div>
<script>
	function contactlog_showedit() {
		//获取选中的列
		var selected = $("#contactlog_list").datagrid("getSelected");
		if(selected==null){
			alert('请选择行！');
		}else{
			//进行编辑操作
			loadWin('编辑联系记录','y.php?r=contactlog/showedit&contactlog_id='+selected.contactlog_id);
		}
	}
</script>